﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Liger.Data;

namespace Test
{
    class Program
    { 
        
        //请开启  SQL Server 兼容性语法 （ansi-92） 
        static DbContext db = new DbContext(DatabaseType.MsAccess, @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Nwind.mdb");

        //static DbContext db = new DbContext(DatabaseType.SqlServer9, @"Data Source=.;Initial Catalog=Northwind;Integrated Security=True");

        static Program()
        {
            db.Logging((sql) =>
            {
                LogManager.WriteLog("A", sql);

                Console.Write(sql);
            });
        } 

        static void Main(string[] args)
        {

            var processing = new TestProcessing();

            processing.Add(new NorthwindWhereTest(db));
            processing.Add(new NorthwindExcuteTest(db));
            processing.Add(new NorthwindSelectTest(db));
            processing.Add(new NorthwindQueryTest(db));
            processing.Add(new NorthwindLinqTest(db));
            processing.Add(new NorthwindCUDTest(db));


            processing.ReadKeyToContinue = false;
            processing.Run();
        }
    }
}
